package com.wonders.controller;


import cn.hutool.core.bean.BeanUtil;
import com.wonders.dto.LoginFormDTO;
import com.wonders.dto.Result;
import com.wonders.dto.UserDTO;
import com.wonders.service.IUserService;
import com.wonders.utils.UserHolder;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
 * 功能描述:用户操作相关业务
 * @Author: yyalin
 * @CreateDate: 2023/8/18 10:11
 */
@Api(tags="用户操作相关业务")
@Slf4j
@RestController
@RequestMapping("/user")
public class UserController {

    @Resource
    private IUserService userService;

    @ApiOperation(value="用户签到", notes="sign")
    @PostMapping("/sign")
    public Result sign(){
        return userService.sign();
    }

    @ApiOperation(value="统计用户连续签到天数", notes="signCount")
    @GetMapping("/sign/count")
    public Result signCount(){
        return userService.signCount();
    }
    @ApiOperation(value="使用HyperLogLog实现访客量统计", notes="testHyperLogLog")
    @GetMapping("/testHyperLogLog")
    public Result testHyperLogLog(){
        return userService.testHyperLogLog();
    }
}